package com.sxau.apm.monitor.common;

public class Template {

    public final static String returnedFunctionTemplate =
            "   Object stat = \"%s\";\n"+
            "   com.sxau.apm.monitor.common.Recorder.send(stat+\" 我被触发了\");\n" +
            "   try {\n" +
            "       Object result = ($w)%s$agent($$);\n" +
            "       com.sxau.apm.monitor.common.Recorder.send(stat+\" 我返回了\");\n" +
            "       return ($r)result;\n" +
            "   } catch (Throwable e) {\n" +
            "       com.sxau.apm.monitor.common.Recorder.send(stat+\" 我抛出了异常\");\n" +
            "       throw e;\n" +
            "   }";

    public final static String voidFunctionTemplate =
            "   Object stat = \"%s\";\n"+
            "   com.sxau.apm.monitor.common.Recorder.send(stat+\" 我被触发了\");\n" +
            "   try {\n" +
            "       %s$agent($$);\n" +
            "       com.sxau.apm.monitor.common.Recorder.send(stat+\"我返回了\");\n" +
            "   } catch (Throwable e) {\n" +
            "       com.sxau.apm.monitor.common.Recorder.send(stat+\"我抛出了异常\");\n" +
            "       throw e;\n" +
            "   }";

}
